package com.brainhealth.customer.mapper;

import java.util.List;

import com.brainhealth.customer.domain.Customer;
import com.brainhealth.customer.domain.CustomerExercise;
import org.apache.ibatis.annotations.Param;

/**
 * 会员训练记录Mapper接口
 * 
 * @author wolong
 * @date 2023-05-09
 */
public interface CustomerExerciseMapper 
{
    /**
     * 查询会员训练记录
     * 
     * @param customerExerciseId 会员训练记录主键
     * @return 会员训练记录
     */
    public CustomerExercise selectCustomerExerciseByCustomerExerciseId(Long customerExerciseId);

    /**
     * 查询会员训练记录列表
     * 
     * @param customerExercise 会员训练记录
     * @return 会员训练记录集合
     */
    public List<CustomerExercise> selectCustomerExerciseList(CustomerExercise customerExercise);

    /**
     * 查询出所有会员训练已经过期会员的列表
     * @return
     */
    List<CustomerExercise> selectCustomerExerciseExpired();

    /**
     * 新增会员训练记录
     * 
     * @param customerExercise 会员训练记录
     * @return 结果
     */
    public int insertCustomerExercise(CustomerExercise customerExercise);

    /**
     * 批量插入会员训练记录
     * @param customerExerciseList
     * @return
     */
    public int batchInsertCustomerExercise(List<CustomerExercise> customerExerciseList);

    /**
     * 修改会员训练记录
     * 
     * @param customerExercise 会员训练记录
     * @return 结果
     */
    public int updateCustomerExercise(CustomerExercise customerExercise);

    /**
     * 批量更新会员训练记录
     * @param list
     * @return
     */
    public int updateBatch(List<CustomerExercise> list);

    /**
     * 删除会员训练记录
     * 
     * @param customerExerciseId 会员训练记录主键
     * @return 结果
     */
    public int deleteCustomerExerciseByCustomerExerciseId(Long customerExerciseId);

    /**
     * 删除会员训练记录
     *
     * @param 会员ID 训练ID
     * @return 结果
     */
    public int deleteCustomerExerciseByCustomerId(@Param("customerId") Long customerId,@Param("exerciseId") Long exerciseId);
    /**
     * 批量删除会员训练记录
     * 
     * @param customerExerciseIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCustomerExerciseByCustomerExerciseIds(Long[] customerExerciseIds);
}
